This plugin is used for integrating Jenkins with Gerrit. A job can be built based on the condition of a project on Gerrit server. For example, a job is built whenever a new patchset is committed.
Click on the manage Jenkins button
Click on the manage plugins button
Switch to Available and search gerrit trigger
Install the plugin.
Setup a user for Jenkins in Gerrit server. Follow the instructions here
Specify the Gerrit server settings via Manage Jenkins
> Gerrit Trigger
. Fill in the server settings as the following figure.
After finishing the settings, click on the Test Connection
button to see if the settings is fine.
Go to the Job Configuration Page and check the gerrit event
option in Build Triggers
.
Choose the preconfigured Gerrit server (set in the previous section).
Check Non-Review Patches is used in this example so that everytime a patchset is created, this job is triggered.
Fill in the project and branch to monitor
Create a new patchset and the project will be built